<div class="breadcrumbs" id="breadcrumbs">
	<ul class="breadcrumb">
		<li><i class="icon-home home-icon"></i><a href="#">Home</a></li>
		<li><a href="<?php Rights::getBaseUrl(); ?>">Access Role</a></li>
		<li class="active">Permissions</li>
	</ul>
	<script type="text/javascript">
		try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
	</script>
</div>
<div class="col-xs-12">
	<div class="page-content">
		<div class="page-header">
			<div class="clearfix">
				<div class="pull-left">
					<h1>
						<h1><?php echo Rights::t('core', 'Permissions'); ?></h1>
					</h1>
				</div>
				<div class="pull-right">
					<div class="btn-toolbar inline middle no-margin">
						<div class="btn-group">
							<a title="Assignments" href="<?php echo Yii::app()->createUrl('rights/assignment/view'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Assignments</a>
							<a title="Permissions" href="<?php echo Yii::app()->createUrl('rights/authItem/permissions'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Permissions</a>
							<a title="Roles" href="<?php echo Yii::app()->createUrl('rights/authItem/roles'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Roles</a>
							<a title="Tasks" href="<?php echo Yii::app()->createUrl('rights/authItem/tasks'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Tasks</a>
							<a title="Operations" href="<?php echo Yii::app()->createUrl('rights/authItem/operations'); ?>" class="btn btn-sm "><i class="icon-file"></i>&nbsp;&nbsp;Operations</a>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="col-xs-12">
			<div class="widget-content">
				<p>
					<?php echo Rights::t('core', 'Here you can view and manage the permissions assigned to each role.'); ?><br />
					<?php echo Rights::t('core', 'Authorization items can be managed under {roleLink}, {taskLink} and {operationLink}.', array(
						'{roleLink}'=>CHtml::link(Rights::t('core', 'Roles'), array('authItem/roles')),
						'{taskLink}'=>CHtml::link(Rights::t('core', 'Tasks'), array('authItem/tasks')),
						'{operationLink}'=>CHtml::link(Rights::t('core', 'Operations'), array('authItem/operations')),
					)); ?>
				</p>
				<p class="info">*) <?php echo Rights::t('core', 'Hover to see from where the permission is inherited.'); ?></p>
				<p>
					<?php echo CHtml::link(Rights::t('core', 'Generate items for controller actions'), array('authItem/generate'), array(
						'class'=>'generator-link',
					)); ?>
				</p>
			</div>
		</div>
		<div class="col-xs-12">
			<div class="widget-box">
				<div class="widget-header header-color-blue">
					<h5 class="bigger lighter">
						<i class="icon-table"></i>
						Permision table.
					</h5>
				</div>

				<div class="widget-body">
					<div class="widget-main no-padding">
						<?php $this->widget('bootstrap.widgets.TbGridView', array(
							'dataProvider'=>$dataProvider,
							'type'=>'striped bordered condensed',
							'template'=>'{items}',
							'emptyText'=>Rights::t('core', 'No authorization items found.'),
							'htmlOptions'=>array('class'=>'grid-view permission-table'),
							'columns'=>$columns,
						)); ?>
					</div>
				</div>
			</div>
		</div><!-- /span -->
		
	</div>
</div>

<?php 
// $this->breadcrumbs = array(
	// 'Rights'=>Rights::getBaseUrl(),
	// Rights::t('core', 'Permissions'),
// ); 
?>
<script type="text/javascript">

	/**
	* Attach the tooltip to the inherited items.
	*/
	jQuery('.inherited-item').rightsTooltip({
		title:'<?php echo Rights::t('core', 'Source'); ?>: '
	});

	/**
	* Hover functionality for rights' tables.
	*/
	$('#rights tbody tr').hover(function() {
		$(this).addClass('hover'); // On mouse over
	}, function() {
		$(this).removeClass('hover'); // On mouse out
	});

</script>
<script>
	$('.id-5').addClass('active');	
	$('.id-5').addClass('open');	
	$('.id-16').addClass('open');	
	$('.id-18').addClass('active');	
</script>